import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useCityStore = defineStore(
  'city',
  () => {
    // 声明城市数组
    const cityList = ref([
      {
        id: +new Date(),
        city: '北京市',
        daytemp: '31',
      },
      {
        id: +new Date(),
        city: '广州市',
        daytemp: '33',
      },
    ])
    return { cityList }
  },
  {
    persist: true, // 持久化
  }
)
